1. Field of the Invention
The present invention relates in general to a rewritable optical recording medium system, and more particularly to a method and apparatus for managing defect areas of an optical recording medium.
2. Description of the Prior Art
Optical recording media are generally classified into three types, or a read only, ROM type, a once writable, WORM type and a repeatedly writable, rewritable type according to the possibility of repetitive writing.
The repeatedly writable optical recording media may be, for example, a rewritable compact disc (CD-RW), a rewritable digital versatile disc (DVD-RAM or DVD-RW), etc.
In such a rewritable optical recording medium, however, because information write/read operations are repeatedly performed according to the availability of the optical recording medium, a mixing ratio of a mixture constituting an information recording layer in the optical recording medium becomes different from the initial value with the lapse of time. For this reason, the information recording layer loses its characteristics, resulting in an error being generated in the information write/read operations.
This phenomenon is called a deterioration, which is revealed as defect areas when formatting, write and read commands of the optical recording medium are performed.
The defect areas of the rewritable optical recording medium may be generated due to a scratch on its surface, a particle such as dust, an error in manufacturing process, etc., in addition to the above-mentioned deterioration.
In this connection, the defect areas of the rewritable optical recording medium must be managed to prevent data from being written/read thereon.
To this end, a conventional rewritable optical recording medium such as a rewritable optical disc comprises defect management areas (referred to hereinafter as DMAs) provided in lead-in and lead-out areas, as shown in FIG. 1. Each DMA includes a primary defect list (referred to hereinafter as PDL) which is a primary defect data storage unit, and a secondary defect list (referred to hereinafter as SDL) which is a secondary defect data storage unit.
A data area is managed in the unit of zones. Each of the zones is composed of a user area, in which actual data is written, and a spare area to be used when the user area is subjected to a defect. As shown in FIG. 2, a guard area is assigned between the adjacent zones to make a distinction therebetween.
The PDL is generally adapted to store entries of defect sectors generated in a disc manufacturing process and entries of defect sectors detected in disc formatting, or initialization and re-initialization.
The SDL is listed in the unit of blocks. This SDL is adapted to store entries of defect areas generated after formatting or entries of defect areas incapable of being stored in the PDL during formatting. Each SDL entry is provided with an area for storing a sector number of a first sector in a block in which a defect sector is generated, and an area for storing a sector number of a first sector in a replacement block with which the defect sector block is to be replaced.
In such an optical disc, each sector has a logical sector number (referred to hereinafter as LSN) and a physical sector number (referred to hereinafter as PSN). The LSNs are presented to only the user areas in which actual data are written. The PSNs indicate physical positions on the disc assigned to all sectors in the disc manufacturing process, respectively.
Hence, if no defect is present in the data area, the LSNs will be assigned to only the user areas in which actual data are written, whereas the PSNs will be assigned to all areas, as shown in FIG. 3a. 
On the other hand, in the case where defects are present in the data area, defect areas (i.e., defect sectors or defect blocks) in the data area must be replaced with normal areas. Generally, slipping replacement and linear replacement methods have been recommended by the optical recording medium standard group.
The slipping replacement method is applied to the case where a defect area is registered in the PDL. In this slipping replacement method, as shown in FIG. 3b, if a defect sector listed in the PDL is present in the user area in which actual data is written, then it is jumped over and replaced with a normal sector subsequent thereto for the writing of data. In this case, a PSN is present in the defect sector listed in the PDL as it is, but no LSN is present in that defect sector because data is not written or read thereon. Instead, the same number of LSNs as that of defect sectors is assigned in the spare are. The spare area with the LSNs assigned become the user area by formatting.
The linear replacement method is applied to the case where a defect area is registered in the SDL. In this linear replacement method, as shown in FIG. 3c, if a defect block listed in the SDL is present in the user area or the spare area, then it is replaced with a block-unit replacement area assigned in the spare area, for the writing of data. In this case, PSNs assigned respectively to sectors in the defect block are present as they are, but LSNs are moved together with data to the replacement block.
However, the above-mentioned slipping replacement and linear replacement methods require a method for searching the optical recording medium for defect sectors registered in the PDL and defect blocks registered in the SDL and a method and apparatus for efficiently managing the defect sectors and defect blocks.
Therefore, it is an object of the present invention to provide a method and apparatus for efficiently managing defect areas of an optical recording medium.
It is another object of the present invention to provide a method and apparatus for managing defect areas of an optical recording medium, in which a data write section and data read section search for and manage defect areas registered in a PDL and SDL.
It is a further object of the present invention to provide a method and apparatus for managing defect areas of an optical recording medium, in which a data write/read controller searches for and manages defect areas registered in a PDL and SDL.
It is yet another object of the present invention to provide a method and apparatus for managing defect areas of an optical recording medium, in which a PSN corresponding to an LSN sent from a host is accurately searched for, using a table.
In accordance with one aspect of the present invention, there is provided a method of managing defect areas of an optical recording medium, comprising the first step of reading a defect management area list and storing the read defect management area list; the second step of comparing a physical sector number of a current position with the defect management area list stored at the first step; and the third step of writing or reading no data on a physical sector of the current position if it is determined at the second step that the physical sector number of the current position is the same as a physical sector number in the defect management area list stored at the first step.
Preferably, the comparison step includes the step of reading a physical sector number of a first defect area subsequent to a first sector to be written or read, from the defect management area list stored at the storage step, storing the read physical sector number and comparing the stored physical sector number with the physical sector number of the current position.
The comparison step includes the step of, if it is determined that the physical sector number of the current position is the same as the stored physical sector number, reading a physical sector number subsequent to the stored physical sector number, from the defect management area list stored at the storage step and updating the stored physical sector number to the read physical sector number.
The comparison step includes the step of, when the physical sector number of the defect area is stored, indicating that the defect area is that registered in a primary data list or a secondary data list.
Preferably, the writing or reading step includes the step of writing or reading data on a normal sector subsequent to the physical sector of the current position while jumping over it, if it is determined at the comparison step that the physical sector number of the current position is the same as the physical sector number in the defect management area list stored at the storage step and it corresponds to a defect area registered in a primary defect list.
The writing or reading step includes the step of writing or reading data of a block including the physical sector of the current position on a replacement block in a spare area, if it is determined at the comparison step that the physical sector number of the current position is the same as the physical sector number in the defect management area list stored at the storage step and it corresponds to a defect area registered in a secondary defect list.
The writing or reading step includes the step of writing or reading data on a normal block subsequent to a block including the physical sector of the current position while jumping over it, if it is determined at the comparison step that the physical sector number of the current position is the same as the physical sector number in the defect management area list stored at the storage step and it corresponds to a defect area registered in a secondary defect list.
The writing or reading step includes the step of receiving a logical sector number included in a write or read command from an external host, converting the received logical sector number into a physical sector number and writing or reading data according to the converted physical sector number.
More preferably, the sector number conversion step includes the first step of detecting a zone to which the logical sector number belongs, upon receiving the logical sector number; the second step of obtaining an offset[zone] value corresponding to the zone detected at the first step; the third step of adding a start physical sector number of a data area to the logical sector number and then adding the offset[zone] value obtained at the second step to the resultant value to obtain a temporary physical sector number; and the fourth step of obtaining the number of registered defect areas in a zone corresponding to the temporary physical sector number, which have values smaller than the temporary physical sector number and adding the obtained value to the temporary physical sector number to obtain a final physical sector number.
In accordance with another aspect of the present invention, there is provided an apparatus for managing defect areas of an optical recording medium, comprising control means for converting a logical sector number from a host into a physical sector number and then generating write/read commands; storage means for reading a defect management area list and storing the read defect management area list; comparison means for comparing a physical sector number of a current position with the defect management area list stored in the storage means; and write/read means for determining whether the data write/read operations are to be performed on a physical sector of the current position, in response to the write/read commands from the control means and the compared result of the comparison means and writing or reading data on the physical sector of the current position in accordance with the determined result.
Preferably, each of the write/read commands from the control means includes a physical sector number and a length of data to be written or read.
Preferably, the comparison means includes a register for reading a physical sector number of a first defect area subsequent to a first sector to be written or read, from the storage means and storing the read physical sector number, the comparison means comparing the physical sector number stored in the register with the physical sector number of the current position.
The comparison means is adapted to, if it is determined that the physical sector number of the current position is the same as the physical sector number stored in the register, read a physical sector number subsequent to the stored physical sector number, from the storage means and update the register to the read physical sector number.
In accordance with yet another aspect of the present invention, there is provided an apparatus for managing defect areas of an optical recording medium, comprising storage means for reading a defect management area list and storing the read defect management area list; control means for converting the logical sector number into a physical sector number, comparing a physical sector number of a current position with the defect management area list stored in the storage means, determining whether the data write/read operations are to be performed on a physical sector of the current position, in accordance with the compared result and generating control signals in accordance with the determined result; and write/read means for performing the data write/read operations in response to the control signals from the control means.
Preferably, the control signals from the control means include write/read enable and disable signals.
Preferably, the control means is adapted to read a physical sector number of a first defect area subsequent to a first sector to be written or read, from the storage means, store the read physical sector number, compare the stored physical sector number with the physical sector number of the current position, read a physical sector number subsequent to the stored physical sector number, from the storage means if it is determined that the physical sector number of the current position is the same as the stored physical sector number and update the stored physical sector number to the read physical sector number.
Preferably, the write/read means is adapted to detect a physical identification of the current position to generate the physical sector number of the current position.